/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.lacibMusic.entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author AlanmLira
 */
@Entity
@Table(name = "Pontuacao")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Pontuacao.findAll", query = "SELECT p FROM Pontuacao p"),
    @NamedQuery(name = "Pontuacao.findById", query = "SELECT p FROM Pontuacao p WHERE p.id = :id"),
    @NamedQuery(name = "Pontuacao.findByPorUsuario", query = "SELECT p FROM Pontuacao p WHERE p.usuarioId = :usuario"),
    @NamedQuery(name = "Pontuacao.findByRock", query = "SELECT p FROM Pontuacao p WHERE p.rock = :rock"),
    @NamedQuery(name = "Pontuacao.findByJazz", query = "SELECT p FROM Pontuacao p WHERE p.jazz = :jazz"),
    @NamedQuery(name = "Pontuacao.findByLatin", query = "SELECT p FROM Pontuacao p WHERE p.latin = :latin"),
    @NamedQuery(name = "Pontuacao.findByHardcore", query = "SELECT p FROM Pontuacao p WHERE p.hardcore = :hardcore"),
    @NamedQuery(name = "Pontuacao.findByPop", query = "SELECT p FROM Pontuacao p WHERE p.pop = :pop"),
    @NamedQuery(name = "Pontuacao.findByCountry", query = "SELECT p FROM Pontuacao p WHERE p.country = :country"),
    @NamedQuery(name = "Pontuacao.findByBlues", query = "SELECT p FROM Pontuacao p WHERE p.blues = :blues"),
    @NamedQuery(name = "Pontuacao.findByFolk", query = "SELECT p FROM Pontuacao p WHERE p.folk = :folk"),
    @NamedQuery(name = "Pontuacao.findByHiphop", query = "SELECT p FROM Pontuacao p WHERE p.hiphop = :hiphop"),
    @NamedQuery(name = "Pontuacao.findByReb", query = "SELECT p FROM Pontuacao p WHERE p.reb = :reb"),
    @NamedQuery(name = "Pontuacao.findByEletronic", query = "SELECT p FROM Pontuacao p WHERE p.eletronic = :eletronic")})
public class Pontuacao implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Column(name = "rock")
    private Integer rock;
    @Column(name = "jazz")
    private Integer jazz;
    @Column(name = "latin")
    private Integer latin;
    @Column(name = "hardcore")
    private Integer hardcore;
    @Column(name = "pop")
    private Integer pop;
    @Column(name = "country")
    private Integer country;
    @Column(name = "blues")
    private Integer blues;
    @Column(name = "folk")
    private Integer folk;
    @Column(name = "hiphop")
    private Integer hiphop;
    @Column(name = "reb")
    private Integer reb;
    @Column(name = "eletronic")
    private Integer eletronic;
    @JoinColumn(name = "perfil_id", referencedColumnName = "id")
    @ManyToOne
    private Perfis perfilId;
    @JoinColumn(name = "usuario_id", referencedColumnName = "nomeUsuario")
    @ManyToOne(optional = false)
    private Usuario usuarioId;

    public Pontuacao() {
    }

    public Pontuacao(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getRock() {
        return rock;
    }

    public void setRock(Integer rock) {
        this.rock = rock;
    }

    public Integer getJazz() {
        return jazz;
    }

    public void setJazz(Integer jazz) {
        this.jazz = jazz;
    }

    public Integer getLatin() {
        return latin;
    }

    public void setLatin(Integer latin) {
        this.latin = latin;
    }

    public Integer getHardcore() {
        return hardcore;
    }

    public void setHardcore(Integer hardcore) {
        this.hardcore = hardcore;
    }

    public Integer getPop() {
        return pop;
    }

    public void setPop(Integer pop) {
        this.pop = pop;
    }

    public Integer getCountry() {
        return country;
    }

    public void setCountry(Integer country) {
        this.country = country;
    }

    public Integer getBlues() {
        return blues;
    }

    public void setBlues(Integer blues) {
        this.blues = blues;
    }

    public Integer getFolk() {
        return folk;
    }

    public void setFolk(Integer folk) {
        this.folk = folk;
    }

    public Integer getHiphop() {
        return hiphop;
    }

    public void setHiphop(Integer hiphop) {
        this.hiphop = hiphop;
    }

    public Integer getReb() {
        return reb;
    }

    public void setReb(Integer reb) {
        this.reb = reb;
    }

    public Integer getEletronic() {
        return eletronic;
    }

    public void setEletronic(Integer eletronic) {
        this.eletronic = eletronic;
    }

    public Perfis getPerfilId() {
        return perfilId;
    }

    public void setPerfilId(Perfis perfilId) {
        this.perfilId = perfilId;
    }

    public Usuario getUsuarioId() {
        return usuarioId;
    }

    public void setUsuarioId(Usuario usuarioId) {
        this.usuarioId = usuarioId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Pontuacao)) {
            return false;
        }
        Pontuacao other = (Pontuacao) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.com.lacibMusic.entidades.Pontuacao[ id=" + id + " ]";
    }
    
}
